<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--    <link rel="StyleSheet" href="css/item.css" type="text/css" media="screen"/>-->
</head>
<body>

<div th:replace="~{common/top}"></div>
<div id="Content">

    <div id="BackLink">
        <a th:href="@{/catalog/product(productId=${product.productId})}"
           th:text="'Return to '+${product.productId}"></a>
    </div>

    <div id="Catalog">

        <table>
            <tr>
                <td th:utext="${item.product.description}">
                </td>
            </tr>
            <tr>
                <td><b th:text="${item.itemId}"></b></td>
            </tr>
            <tr>
                <td>
                    <b>
                        <font size="4" th:text="${item.attribute1==null?'':item.attribute1}
                        +' '+${item.attribute2==null?'':item.attribute2}
                        +' '+${item.attribute3==null?'':item.attribute3}
                        +' '+${item.attribute4==null?'':item.attribute4}
                        +' '+${item.attribute5==null?'':item.attribute5}
                        +' '+${product.name==null?'':product.name}">
                        </font>
                    </b>
                </td>
            </tr>
            <tr>
                <td th:text="${product.name}"></td>
            </tr>
            <tr>
                <td th:if="${item.quantity} le '0'">
                    Back ordered.
                </td>
                <td th:if="${item.quantity} gt '0'" th:text="${item.quantity}+' in stock.'">

                </td>
            </tr>
            <tr>
                <td th:text="'$'+${#numbers.formatDecimal(item.listPrice, 1,2)}">

                </td>
            </tr>

            <tr>
                <td th:if="${item.quantity} gt '0'">
                    <a class="Button" th:href="@{/cart/add(itemId=${item.itemId})}">Add to Cart</a>
                </td>
            </tr>
        </table>

    </div>

</div>
<div th:replace="~{common/bottom}"></div>
</body>
</html>